<% if params[:cancel] %>
  $('#comment-<%= @comment.id %>').replaceWith("<%= escape_javascript(render :partial => 'comments/comment', :formats => [:html], :locals => {:comment => @comment, :highlighted => true}) %>")
<% else %>
  $('#comment-<%= @comment.id %>').html("<%= escape_javascript(render :partial => 'comments/edit_form', :locals => {:comment => @comment}) %>");
  $('#comment-<%= @comment.id %>').scrollTo();
  $.remove_rte()
  $.rte_comments()
<% end %>

if (typeof($.CE.commentUpdatedCallback) != 'undefined'){
  $.CE.commentUpdatedCallback('<%= @comment.id %>')
}
